
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String basePath = request.getScheme() + "://" +
            request.getServerName() + ":" + request.getServerPort() +
            request.getContextPath() + "/";
%>
<html>
<head>
    <title>个人中心</title>
    <base href="<%=basePath%>" />
    <script type="text/javascript" src="js/jquery-3.4.1.js"></script>
    <script type="text/javascript">
        $(function () {
            //payment();
        })
        function payment(){
            $.ajax({
                url:"user/payment2.do",
                type:"post",
                dataType:"json",
                data:{
                    "pwd":$("#pwd").val()
                },
                success:function(data){
                    if (data){
                        $("#CheckMsg").text("支付成功！");
                    }else {
                        $("#CheckMsg").text("支付密码错误，支付失败！");
                    }
                    setTimeout(function () {
                        $("#CheckMsg").text("");
                    },1600);
                }
            })
        }
    </script>
    <title>支付页面</title>
    <style>
        .msg{
            color: #ea8c37;
            font-size: 14px;
            padding-left: 40px;
            padding-top: 10px;
            clear: both;
            font-weight: bold;
        }
    </style>
</head>
<body>
<div style="text-align: center;position: relative;top: 200px;">
    <form id="loginForm" >
        <input type="hidden" id="hdnContextPath" name="hdnContextPath" value="<%=request.getContextPath() %>"/>
        <P>
            <input style="width: 200px;height: 40px;" id="pwd" type="password" placeholder="请输入支付密码"/>
        </P>
        <button onclick="payment()" type="button" style="width: 150px;height: 40px;border-radius: 0.5rem;background-color: #428bca;border: 1px solid #CCC;color: #FFFFFF">支付</button>
        <div id="CheckMsg" class="msg"></div>
    </form>
</div>
</body>
</html>
